//创建路由器并且暴露
//引入 createRouter
import {createRouter,createWebHistory,createWebHashHistory} from "vue-router";
//引入需要呈现的组件
import Home from "@/views/Home.vue";
import News from "@/views/News.vue";
import About from "@/views/About.vue";
import Detail from "@/views/Detail.vue";
//createWebHashHistory的URl会附带#
//创建路由器指定路由设计路由工作模式
const  router=createRouter({
    history:createWebHistory(),//路由器的工作模式
    routes:[{
        name:'zhuye',
        path:'/home',
        component:Home
    },{
        name:'guanyu',
        path:'/about',
        component:About
    },{
        name:'xinwen',
        path:'/news',
        component:News,
        children:[
        {name:'ll',
            path:'detail/:id/:title/:content', //路径+:传参
        component:Detail
        }],qiantao
    }
    ]
})
//暴露
export  default router